package com.google.blockly.ohos.demo.view;

import com.google.blockly.ohos.demo.*;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class OtherAbilityTest {

    @Before
    public void setUp() throws Exception {

    }

    @After
    public void tearDown() throws Exception {
        EventHelper.clearAbilities();
    }

    @Test
    public void startPHPAbility() throws Exception {
        PHPAbility ability = EventHelper.startAbility(PHPAbility.class);
        Thread.sleep(1000);
        Assert.assertNotNull("It's right", ability);
    }

    @Test
    public void startDartAbility() throws Exception {
        DartAbility ability = EventHelper.startAbility(DartAbility.class);
        Thread.sleep(1000);
        Assert.assertNotNull("It's right", ability);
    }

    @Test
    public void startLuaAbility() throws Exception {
        LuaAbility ability = EventHelper.startAbility(LuaAbility.class);
        Thread.sleep(1000);
        Assert.assertNotNull("It's right", ability);
    }

    @Test
    public void startPythonAbility() throws Exception {
        PythonAbility ability = EventHelper.startAbility(PythonAbility.class);
        Thread.sleep(1000);
        Assert.assertNotNull("It's right", ability);
    }

    @Test
    public void startSplitAbility() throws Exception {
        SplitAbility ability = EventHelper.startAbility(SplitAbility.class);
        Thread.sleep(1000);
        Assert.assertNotNull("It's right", ability);
    }

}